package com.liangxy.zhyl.mapper;

import com.github.pagehelper.Page;
import com.liangxy.zhyl.dto.NursingProjectPlanDto;
import com.liangxy.zhyl.entity.NursingPlan;
import com.liangxy.zhyl.vo.NursingPlanVo;
import com.liangxy.zhyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingPlanMapper {

    /**
     * 查询所有的护理计划
     * @return
     */
    List<NursingProjectVo> selectAll();

    /**
     * 查找数据就行了
     * @param planName
     * @param status
     * @return
     */
    Page<NursingPlanVo> pageNursingPlan(@Param("planName")String planName, @Param("status")Integer status);
    /**
     * 根据id查询护理计划
     * @param id
     * @return
     */
    @Select("select * from nursing_plan where id = #{id} ")
    NursingPlan selectNursingPlan(Long id);

    /**
     * 添加护理计划
     * @param nursingPlan
     */
    void addNursingPlan(NursingPlan nursingPlan);

    /**
     * 修改护理计划
     * @param nursingPlan
     */
    void update(NursingPlan nursingPlan);
    /**
     * 删除护理计划
     * @param id
     */
    void deleteById(Long id);
}
